﻿Imports System.Data.SqlClient
Public Class dbClient
    Dim Var As New varDeclare

    Public Function GetActiveClientList() As DataTable
        Dim connection As SqlConnection
        Dim adapter As SqlDataAdapter
        Dim command As New SqlCommand
        Dim ds As New DataSet
        connection = New SqlConnection(Var.ConnString)
        connection.Open()
        command.Connection = connection
        command.CommandType = CommandType.Text
        command.CommandText = "SELECT CltGenID [ID], CltName [Client Name], CltDesc [Desctiption], CltAccountAR [Account AR], CltAccountAP [Account AP] FROM tblClient"
        adapter = New SqlDataAdapter(command)
        adapter.Fill(ds)
        connection.Close()
        Return ds.Tables(0)
    End Function

End Class
